<?php

function CheckSysLicenseForRule()
{
        $license = CheckSysLicense2();
	return $license;
}


function CheckSysLicense2()
{
	$file_name = "/usr/etc/license";
	$handle = fopen($file_name, "r");
	if ($handle == FALSE) {
		return FALSE;
	}

	$contents = fread($handle, filesize ($file_name));
	fclose($handle);
	
	switch ($contents) {
	case 0:
	case 2:
	case 4:
		$ret = FALSE;
		break;
	case 1:
	case 3:
	case 5:
	case 6:
	case 7:
	case 8:
		$ret = TRUE;
		break;

	default:
		$ret = FALSE;
		break;
	}
	
	return $ret;
}
?>
